package com.hello.sky.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.hello.sky.model.dto.*;
import com.hello.sky.model.entity.Orders;
import com.hello.sky.model.vo.OrderPaymentVO;
import com.hello.sky.model.vo.OrderStatisticsVO;
import com.hello.sky.model.vo.OrderSubmitVO;
import com.hello.sky.model.vo.OrderVO;
import com.hello.sky.result.PageResult;

/**
 * <p>
 * 订单表 服务类
 * </p>
 *
 * @author D
 * @since 2024-05-06
 */
public interface OrdersService extends IService<Orders> {

    OrderSubmitVO submitOrder(OrdersSubmitDTO orderDot);

    /**
     * 订单支付
     * @param paymentDTO
     * @return
     */
    OrderPaymentVO payment(OrdersPaymentDTO paymentDTO) throws Exception;

    /**
     * 支付成功，修改订单状态
     * @param outTradeNo
     */
    void paySuccess(String outTradeNo);

    PageResult historyOrdersPage(OrdersPageQueryDTO dto);

    OrderVO historyOrdersByOrderId(Long orderId);

    void userCancelByOrderId(Long orderId);

    void repetition(Long id);

    PageResult conditionSearchPage(OrdersPageQueryDTO dto);

    void accept(Orders orders);

    void rejection(OrdersRejectionDTO dto);

    void adminCancel(OrdersCancelDTO dto);

    void delivery(Long orderId);

    void complete(Long orderId);

    OrderVO orderDetail(Long id);

    void reminder(Long id);

    OrderStatisticsVO statistics();
}
